# coding=utf-8

from mysql import UsingMysql
import time

class SpiderUser:
    '''
    用户信息 Model
    @author Woody
    @date 2021.12.18
    '''
    #表名
    __table_name = 'ai_spider_yaozh_user'

    def __init__(self) -> None:
        pass

    # 保存已采位置
    def get(self, spider_id):
        """
        获取单条数据
        """
        with UsingMysql(log_time=True) as um:
            um.cursor.execute("SELECT * from `"+self.__table_name+"` WHERE `spider_id`='"+spider_id+"'")
            return um.cursor.fetchone()

